//
//  ByViewRedPicket.m
//  chequanbao_ios
//
//  Created by pro on 2017/6/13.
//  Copyright © 2017年 com.itboye. All rights reserved.
//

#import "ByViewRedPicket.h"

@implementation ByViewRedPicket

- (instancetype)init {
    self = [super init];
    if (self) {

        self.popMode = ZKBombPopModeTop;
        self.positionMode = ZKBombPositionModeCenter;
        self.damping = 0.6;
        self.aniDuration = 0.8;
        
        [self setupContents];
    }
    return self;
}
- (void)setupContents {
    
    UIImageView *rpView = [[UIImageView alloc] initWithFrame:CGRectMake(0, 0, SCREEN_WIDTH * 0.6, SCREEN_WIDTH * 0.6 / 2003 * 1619)];
    rpView.image = [UIImage imageNamed:@"Index_red_picket"];
    
    rpView.userInteractionEnabled = YES;
    UITapGestureRecognizer *tap = [[UITapGestureRecognizer alloc] initWithTarget:self action:@selector(tapAction)];
    [rpView addGestureRecognizer:tap];
    
    self.contentView = rpView;
}

- (void)tapAction {
    
    [self remove];
    if (self.rpTapBlock) {
        self.rpTapBlock();
    }
}


@end
